<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1 , user-scalable=no">
  <TITLE>查看课程详情</TITLE>
  <link href="__PUBLIC__/plugins/bootstrap.css" rel="stylesheet">
  <link href="__PUBLIC__/plugins/bootstrap-dashen.css" rel="stylesheet">
  <link href="__PUBLIC__/plugins/font-awesome.css" rel="stylesheet">
  <link href="__PUBLIC__/plugins/animate.css" rel="stylesheet"> 
</head>
<body style="margin-top:70px;"> 
{include file="common/header" /}
<div class="container">
	<ul class="breadcrumb">
  		<li><a href="__PUBLIC__/index.php">首页</a></li>
  		<li><a href="{:url('Course/frontlist')}">课程信息</a></li>
  		<li class="active">详情查看</li>
	</ul>
	<div class="row bottom15"> 
		<div class="col-md-2 col-xs-4 text-right bold">课程编号:</div>
		<div class="col-md-10 col-xs-6">{$course.courseNumber}</div>
	</div>
	<div class="row bottom15"> 
		<div class="col-md-2 col-xs-4 text-right bold">课程名称:</div>
		<div class="col-md-10 col-xs-6">{$course.courseName}</div>
	</div>
	<div class="row bottom15"> 
		<div class="col-md-2 col-xs-4 text-right bold">开课老师:</div>
		<div class="col-md-10 col-xs-6">{$course.courseTeacherF.teacherName}</div>
	</div>
	<div class="row bottom15"> 
		<div class="col-md-2 col-xs-4 text-right bold">上课时间:</div>
		<div class="col-md-10 col-xs-6">{$course.courseTime}</div>
	</div>
	<div class="row bottom15"> 
		<div class="col-md-2 col-xs-4 text-right bold">上课地点:</div>
		<div class="col-md-10 col-xs-6">{$course.coursePlace}</div>
	</div>
	<div class="row bottom15"> 
		<div class="col-md-2 col-xs-4 text-right bold">课程学分:</div>
		<div class="col-md-10 col-xs-6">{$course.courseScore}</div>
	</div>
	<div class="row bottom15"> 
		<div class="col-md-2 col-xs-4 text-right bold">附加信息:</div>
		<div class="col-md-10 col-xs-6">{$course.courseMemo}</div>
	</div>
	<div class="row bottom15">
		<div class="col-md-2 col-xs-4"></div>
		<div class="col-md-6 col-xs-6">
			<button onclick="xuanke();" class="btn btn-primary">选课</button>&nbsp;&nbsp;
			<button onclick="history.back();" class="btn btn-info">返回</button>
		</div>
	</div>
</div> 
{include file="common/footer" /}
<script src="__PUBLIC__/plugins/jquery.min.js"></script>
<script src="__PUBLIC__/plugins/bootstrap.js"></script>
<script src="__PUBLIC__/plugins/wow.min.js"></script>
<script>
    function xuanke() {
        $.ajax({
            url : "{:url('CourseSelect/frontStudentAdd')}",
            type : "post",
            dataType: "json",
            data: {
                "courseSelect_courseNumber_courseNumber": "{$course.courseNumber}"
            },
            success : function (data, response, status) {
                if(data.success){
                    alert("选课成功~");
                    location.reload();
                } else{
                    alert(data.message);
                }
            }
        });
    }

$(function(){
        /*小屏幕导航点击关闭菜单*/
        $('.navbar-collapse a').click(function(){
            $('.navbar-collapse').collapse('hide');
        });
        new WOW().init();
 })
 </script> 
</body>
</html>

